package mxmf.data;

import java.io.Serializable;

/**
 * 数据权限.
 * @author alaspo
 *
 */
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;
    public static final String STAR = "*";

    public static final String CODE_CP = "cp";
    public static final String CODE_OP = "op";
    public static final String CODE_TYPE_CODE = "typeCode";
    public static final String CODE_DISABLED_PARTNER = "disabled";

    public static final String OPER_READ = "read";
    public static final String OPER_WRITE = "write";
    public static final String OPER_SPECIAL = "special";

    private String type;

    private String code;//cp/tag/

    private String value;

    private Long valueId;//oms使用

    private String oper;

    public boolean isValueStar() {
        return STAR.equals(value);
    }

    public boolean isOperStar() {
        return STAR.equals(oper);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getOper() {
        return oper;
    }

    public void setOper(String oper) {
        this.oper = oper;
    }

    public Long getValueId() {
        return valueId;
    }

    public void setValueId(Long valueId) {
        this.valueId = valueId;
    }

}
